class_name Weather
extends Node2D



enum Category {
    NORMAL,
    SUNNY,
    RAINSTORM,
    SNOWSTORM,
}


@export var category: Category
@export var duration: float
@export var icon: Texture2D
@export_multiline var description: String

@export var env_brightness: float

@export_group("数值修改")
@export var fire_resistance_modifier: float
@export var ice_resistance_modifier: float
@export var thunder_resistance_modifier: float
@export var fire_anomaly_modifier: int
@export var ice_anomaly_modifier: int
@export var thunder_anomaly_modifier: int


@warning_ignore("unused_signal")
signal finished(category_: Category)



func startup(_env: WorldEnvironment, _map: Node2D) -> void:
    pass


func end() -> void:
    pass


func get_category_text() -> String:
    return get_category_str(category)


static func get_category_str(category_: Category) -> String:
    match category_:
        Category.NORMAL: return "风和日丽"
        Category.SUNNY: return "大晴天"
        Category.RAINSTORM: return "暴风雨"
        Category.SNOWSTORM: return "暴风雪"
    return "风和日丽"
